import request from "@/utils/request.ts";
import Enum from "@/api/orderApi/enum.ts";
import type { Response } from "@/types/commonTypes/commonTypes.ts";
import type { Order, OrderParams } from "@/types/orderTypes/orderTypes.ts";
/*创建订单的接口*/
export const createOrderAPI = (): Promise<Response<Order>> => request.get<any, Response<Order>>(Enum.createOrder);

/*提交订单的接口*/
export const submitOrderAPI = (data: OrderParams): Promise<Response<any>> => request.post<any, Response<any>>(Enum.submitOrder, data);

/*获取订单详情的接口*/
export const findOrderInfoAPI = (id: string): Promise<Response<any>> => request.get<any, Response<any>>(`/member/order/${id}`);
